
#DataMapper::Logger.new($stdout, :debug)
#DataMapper::Model.raise_on_save_failure = true
DataMapper::Property::String.length(255)

DataMapper.setup(:default, ENV['DATABASE_URL'] || 'sqlite::memory:')

# load models
require File.expand_path('../modules/config_db.rb', File.dirname(__FILE__))
require File.expand_path('../modules/user.rb', File.dirname(__FILE__))
require File.expand_path('../modules/usergroup.rb', File.dirname(__FILE__))
require File.expand_path('../modules/project.rb', File.dirname(__FILE__))
require File.expand_path('../modules/tasklet.rb', File.dirname(__FILE__))
require File.expand_path('../modules/assignment.rb', File.dirname(__FILE__))
require File.expand_path('../modules/monitor.rb', File.dirname(__FILE__))
require File.expand_path('../modules/trace.rb', File.dirname(__FILE__))

DataMapper.finalize

#DataMapper.auto_migrate!
DataMapper.auto_upgrade!
